﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using System.Data;
using ModuleDALCore;

namespace DAL
{
    public class Sys_PermistionDAO:DALBase 
    {
        private String _SpName ;
        public String SpName
        {
            get { return "SpSys_Permistion"; }
            set { _SpName = value; }
        }
        public Sys_PermistionDAO()
        {
            OpenConnect();
        }
        public DataTable GetModuleFolowUser(int IdUser,int flag)
        {
            try
            {
                Sys_Permistion p = new Sys_Permistion();
                p.IdUser = IdUser;
                return DBManager.Intance.ExecuteDataTable(SpName, ConvertClassToArray.GetParamName(p, 0), ConvertClassToArray.GetValues(p, 0));
               // return DBManager.Intance.ExecuteDataTable(this._SpName, new string[] { "flag", "IDUser" }, new object[] { 0, IdUser });
            }
            catch (Exception ex)
            {
                throw new InvalidProgramException(ex.Message);
            }
        }
      
    }
}
